package cc.rengu.redp.system.service;

import cc.rengu.redp.common.exception.RedpException;
import cc.rengu.redp.system.domain.Organization;
import cc.rengu.redp.system.domain.OrganizationVO;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;
import java.util.Map;

/**
 * @author System
 */
public interface OrganizationService extends IService<Organization> {
    Map<String, Object> findOrgTrees(OrganizationVO organization);

    List<Organization> findList(OrganizationVO organization);

    /**
     * 添加机构信息
     * @param organization
     * @throws RedpException
     */
    void add(OrganizationVO organization) throws RedpException;

    /**
     * 修改机构信息
     * @param organization
     * @throws RedpException
     */
    void update(OrganizationVO organization) throws RedpException;

    /**
     * 递归删除机构
     *
     * @param orgIds orgIds
     */
    void delete(Long[] orgIds) throws Exception;
}
